package com.kongyz;

import com.kongyz.observer.BinaryObserver;
import com.kongyz.observer.HexaObserver;
import com.kongyz.observer.OctalObserver;

/**
 * @author kongyz
 * @date 2018/7/3 21:39
 * @Description:
 */
public class Demo {
    public static void main(String[] args) {
        Subject subject=new Subject();

        //观察者
        HexaObserver hexa= new HexaObserver(subject);
        OctalObserver octal=new OctalObserver(subject);
        BinaryObserver binary=new BinaryObserver(subject);

        System.out.println("十进制15的值：");
        subject.setState(15);
        System.out.println("十进制10的值：");
        subject.setState(10);

    }
}
